<div class="problemindexholder" problemindex="A">
 <div class="ttypography">
  <div class="problem-statement">
   <div class="header">
    <div class="title">
     A. Diversity
    </div>
    <div class="time-limit">
     <div class="property-title">
      time limit per test
     </div>
     1 second
    </div>
    <div class="memory-limit">
     <div class="property-title">
      memory limit per test
     </div>
     256 megabytes
    </div>
    <div class="input-file">
     <div class="property-title">
      input
     </div>
     standard input
    </div>
    <div class="output-file">
     <div class="property-title">
      output
     </div>
     standard output
    </div>
   </div>
   <div>
    <p>
     Calculate the minimum number of characters you need to change in the string
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     , so that it contains at least
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     different letters, or print that it is impossible.
    </p>
    <p>
     String
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     consists only of lowercase Latin letters, and it is allowed to change characters only to lowercase Latin letters too.
    </p>
   </div>
   <div class="input-specification">
    <div class="section-title">
     Input
    </div>
    <p>
     First line of input contains string
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     , consisting only of lowercase Latin letters (
     <span class="tex-span">
      1 ≤ |
      <i>
       s
      </i>
      | ≤ 1000
     </span>
     ,
     <span class="tex-span">
      |
      <i>
       s
      </i>
      |
     </span>
     denotes the length of
     <span class="tex-span">
      <i>
       s
      </i>
     </span>
     ).
    </p>
    <p>
     Second line of input contains integer
     <span class="tex-span">
      <i>
       k
      </i>
     </span>
     (
     <span class="tex-span">
      1 ≤
      <i>
       k
      </i>
      ≤ 26
     </span>
     ).
    </p>
   </div>
   <div class="output-specification">
    <div class="section-title">
     Output
    </div>
    <p>
     Print single line with a minimum number of necessary changes, or the word «
     <span class="tex-font-style-tt">
      impossible
     </span>
     » (without quotes) if it is impossible.
    </p>
   </div>
   <div class="sample-tests">
    <div class="section-title">
     Examples
    </div>
    <div class="sample-test">
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>yandex<br/>6<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>0<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>yahoo<br/>5<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>1<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>google<br/>7<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>impossible<br/></pre>
     </div>
    </div>
   </div>
   <div class="note">
    <div class="section-title">
     Note
    </div>
    <p>
     In the first test case string contains
     <span class="tex-span">
      6
     </span>
     different letters, so we don't need to change anything.
    </p>
    <p>
     In the second test case string contains
     <span class="tex-span">
      4
     </span>
     different letters:
     <span class="tex-span">
      {'
      <i>
       a
      </i>
      ', '
      <i>
       h
      </i>
      ', '
      <i>
       o
      </i>
      ', '
      <i>
       y
      </i>
      '}
     </span>
     . To get
     <span class="tex-span">
      5
     </span>
     different letters it is necessary to change one occurrence of
     <span class="tex-span">
      '
      <i>
       o
      </i>
      '
     </span>
     to some letter, which doesn't occur in the string, for example,
     <span class="tex-span">
      {'
      <i>
       b
      </i>
      '}
     </span>
     .
    </p>
    <p>
     In the third test case, it is impossible to make
     <span class="tex-span">
      7
     </span>
     different letters because the length of the string is
     <span class="tex-span">
      6
     </span>
     .
    </p>
   </div>
  </div>
  <p>
  </p>
 </div>
</div>
